1 /**
2   hdf5.bindings.enum.d
3 
4   Idea is to separate out low level API call declarations and enums/callback prototypes.  When
5   finished most D code should not need to call the low level API, so better make it easy not
6   to include it unless specifically needed - avoids calling the wrong version by accident.
7 
8   D Language bindings to the HDF5 Library.  (Paired with a set of high-level wrappers)
9   https://github.com/Laeeth/d_hdf5
10   No restriction on use beyond those applying from HDF5 and the original C API by Stefan Frijters
11   However, if you use them, I would not mind knowing your application and suggestions for
12   improvement if you feel like sharing.  laeeth@laeeth.com
13 
14 
15 
16   Copyright by The HDF Group.                                               *
17   Copyright by the Board of Trustees of the University of Illinois.         *
18   All rights reserved.                                                      *
19                                                                             *
20   This file is part of HDF5.  The full HDF5 copyright notice, including     *
21   terms governing use, modification, and redistribution, is contained in    *
22   the files COPYING and Copyright.html.  COPYING can be found at the root   *
23   of the source code distribution tree; Copyright.html can be found at the  *
24   root level of an installed copy of the electronic HDF5 document set and   *
25   is linked from the top-level documents page.  It can also be found at     *
26   http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
27   access to either file, you may request a copy from help@hdfgroup.org.     *
28   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
29   Ported to D by Laeeth Isharc 2014
30   Borrowed heavily in terms of C API declarations from https://github.com/SFrijters/hdf5-d
31   Stefan Frijters bindings for D
32 
33   Bindings probably not yet complete or bug-free.
34 
35   Consider this not even alpha stage.  It probably isn't so far away from being useful though.
36   This is written for Linux and will need modification to work on other platforms.
37 */
38 
39 module hdf5.bindings.enums;
40 public import core.stdc.stdint;
41 public import core.sys.posix.sys.types: off_t;
42 public import core.stdc.time;
43 public import core.stdc.stdint;
44 import std.conv;
45 import std..string;
46 import std.array;
47 import std.stdio;
48 
49 enum h5parallel=0;
50 
51 enum H5_VERS_MAJOR   = 1;  /* For major interface/format changes */
52 enum H5_VERS_MINOR   = 8;  /* For minor interface/format changes */
53 enum H5_VERS_RELEASE = 14; /* For tweaks, bug-fixes, or development */
54 enum H5_VERS_SUBRELEASE  = ""; /* For pre-releases like snap0 */
55                 /* Empty string for real releases.           */
56 enum H5_VERS_INFO = "HDF5 library version: 1.8.14"; /* Full version string */
57 
58 alias herr_t = int;
59 alias hbool_t = uint;
60 alias htri_t = int;
61 
62 static if ( H5_SIZEOF_SIZE_T==H5_SIZEOF_INT ) {
63   alias ssize_t = int;
64  }
65 else static if ( H5_SIZEOF_SIZE_T==H5_SIZEOF_LONG ) {
66   alias ssize_t = long;
67 }
68 else static if ( H5_SIZEOF_SIZE_T==H5_SIZEOF_LONG_LONG ) {
69   alias ssize_t = long;
70 }
71 else {
72   static assert(0, "nothing appropriate for ssize_t");
73 }
74 
75 alias hsize_t = ulong;
76 alias hssize_t = long;
77 
78 static if (H5_SIZEOF_INT64_T >= 8 ) {
79   alias haddr_t = uint64_t;
80   enum HADDR_UNDEF = ( cast(haddr_t) cast(int64_t)(-1));
81   enum H5_SIZEOF_HADDR_T = H5_SIZEOF_INT64_T;
82   enum HADDR_AS_MPI_TYPE = MPI_LONG_LONG_INT;
83 }
84 else static if (H5_SIZEOF_INT >= 8 ) {
85   alias haddr_t = uint;
86   enum HADDR_UNDEF = (cast(haddr_t)(-1));
87   enum H5_SIZEOF_HADDR_T = H5_SIZEOF_INT;
88   enum HADDR_AS_MPI_TYPE = MPI_UNSIGNED;
89 }
90 else static if (H5_SIZEOF_LONG >= 8 ) {
91   alias haddr_t = ulong;
92   enum HADDR_UNDEF = (cast(haddr_t) cast(long)(-1));
93   enum H5_SIZEOF_HADDR_T = H5_SIZEOF_LONG;
94   enum HADDR_AS_MPI_TYPE = MPI_UNSIGNED_LONG;
95 }
96 else static if (H5_SIZEOF_LONG_LONG >= 8 ) {
97   alias haddr_t = ulong;
98   enum HADDR_UNDEF = (cast(haddr_t) cast(long)(-1));
99   enum H5_SIZEOF_HADDR_T = H5_SIZEOF_LONG_LONG;
100   enum HADDR_AS_MPI_TYPE = MPI_LONG_LONG_INT;
101 }
102 else {
103   static assert(0, "nothing appropriate for haddr_t");
104  }
105 
106 static if ( H5_SIZEOF_UINT64_T>=8 ) { }
107  else static if ( H5_SIZEOF_INT>=8 ) {
108     alias uint64_t = uint;
109     enum H5_SIZEOF_UINT64_T = H5_SIZEOF_INT;
110    }
111  else static if ( H5_SIZEOF_LONG>=8 ) {
112     alias uint64_t = uint;
113     enum H5_SIZEOF_UINT64_T = H5_SIZEOF_LONG;
114    }
115  else static if ( H5_SIZEOF_LONG_LONG>=8 ) {
116     alias uint64_t = ulong;
117     enum H5_SIZEOF_UINT64_T = H5_SIZEOF_LONG_LONG;
118    }
119    else {
120      static assert(0, "nothing appropriate for uint64_t");
121    }
122 
123 /* Default value for all property list classes */
124 enum H5P_DEFAULT = 0;
125 
126 /* Common iteration orders */
127 enum H5IterOrder
128 {
129     Unknown = -1,       /* Unknown order */
130     Inc,                /* Increasing order */
131     Dec,                /* Decreasing order */
132     Native,             /* No particular order, whatever is fastest */
133     N               /* Number of iteration orders */
134 }
135 
136 /* Iteration callback values */
137 /* (Actually, any postive value will cause the iterator to stop and pass back
138  *      that positive value to the function that called the iterator)
139  */
140 enum H5_ITER_ERROR = (-1);
141 enum H5_ITER_CONT = (0);
142 enum H5_ITER_STOP = (1);
143 
144 /*
145  * The types of indices on links in groups/attributes on objects.
146  * Primarily used for "<do> <foo> by index" routines and for iterating over
147  * links in groups/attributes on objects.
148  */
149 enum H5Index {
150     Unknown = -1,  /* Unknown index type           */
151     Name,      /* Index on names           */
152     CRTOrder,     /* Index on creation order      */
153     N          /* Number of indices defined        */
154 }
155 
156 /*
157  * Storage info struct used by H5OInfo  and H5F_info_t
158  */
159 align(1)
160 {
161   struct H5_ih_info_t {
162       hsize_t     index_size;     /* btree and/or list */
163       hsize_t     heap_size;
164   }
165 }
166 
167 enum H5AC__CURR_CACHE_CONFIG_VERSION   =1;
168 enum H5AC__MAX_TRACE_FILE_NAME_LEN   =1024;
169 
170 enum H5AC_METADATA
171 {
172   WRITE_STRATEGY__PROCESS_0_ONLY    =0,
173   WRITE_STRATEGY__DISTRIBUTED       =1,
174 }
175 struct H5ACCacheConfig
176 {
177     align(1)
178     {
179       /* general configuration fields: */
180       int                     ver;
181 
182       hbool_t        rpt_fcn_enabled;
183 
184       hbool_t        open_trace_file;
185       hbool_t                  close_trace_file;
186       char[H5AC__MAX_TRACE_FILE_NAME_LEN + 1] trace_file_name;
187 
188       hbool_t                  evictions_enabled;
189 
190       hbool_t                  set_initial_size;
191       size_t                   initial_size;
192 
193       double                   min_clean_fraction;
194 
195       size_t                   max_size;
196       size_t                   min_size;
197 
198       long                 epoch_length;
199 
200 
201       /* size increase control fields: */
202       //enum H5C_cache_incr_mode=incr_mode;
203 
204       double                   lower_hr_threshold;
205 
206       double                   increment;
207 
208       hbool_t                  apply_max_increment;
209       size_t                   max_increment;
210 
211       //enum H5C_cache_flash_incr_mode      =flash_incr_mode;
212       double                              flash_multiple;
213       double                              flash_threshold;
214 
215 
216       /* size decrease control fields: */
217       //enum H5C_cache_decr_mode decr_mode;
218 
219       double                   upper_hr_threshold;
220 
221       double                   decrement;
222 
223       hbool_t                  apply_max_decrement;
224       size_t                   max_decrement;
225 
226       int                      epochs_before_eviction;
227 
228       hbool_t                  apply_empty_reserve;
229       double                   empty_reserve;
230 
231 
232       /* parallel configuration fields: */
233       int                      dirty_bytes_threshold;
234       int                      metadata_write_strategy;
235     }
236 }
237 
238 
239 
240 
241 /*****************/
242 /* Public Macros */
243 /*****************/
244 
245 /* Macros used to "unset" chunk cache configuration parameters */
246 enum H5D_CHUNK_CACHE_NSLOTS_DEFAULT = (cast(size_t) -1);
247 enum H5D_CHUNK_CACHE_NBYTES_DEFAULT = (cast(size_t) -1);
248 enum H5D_CHUNK_CACHE_W0_DEFAULT     = -1.;
249 
250 /* Property names for H5LTDdirect_chunk_write */   
251 enum H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME     = "direct_chunk_flag";
252 enum H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_NAME  = "direct_chunk_filters";
253 enum H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_NAME   = "direct_chunk_offset";
254 enum H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_NAME = "direct_chunk_datasize";
255 
256 /*******************/
257 /* Public Typedefs */
258 /*******************/
259 
260 /* Values for the H5D_LAYOUT property */
261 enum H5DLayout
262 {
263     Error    = -1,
264 
265     Compact     = 0,    /*raw data is very small             */
266     Contiguous  = 1,    /*the default                    */
267     Chunked     = 2,    /*slow and fancy                 */
268     Nlayouts    = 3 /*this one must be last!             */
269 }
270 
271 /* Types of chunk index data structures */
272 enum H5D_chunk_index_t {
273     H5D_CHUNK_BTREE = 0 /* v1 B-tree index               */
274 }
275 
276 /* Values for the space allocation time property */
277 enum H5DAllocTime {
278     Error    = -1,
279     Default      = 0,
280     Early    = 1,
281     Late     = 2,
282     Incr     = 3
283 }
284 
285 /* Values for the status of space allocation */
286 enum H5DSpaceStatus
287 {
288     Error      = -1,
289     NotAllocated  = 0,
290     PartAllocated = 1,
291     Allocated      = 2
292 }
293 
294 /* Values for time of writing fill value property */
295 enum H5D_fill_time_t {
296     H5D_FILL_TIME_ERROR = -1,
297     H5D_FILL_TIME_ALLOC = 0,
298     H5D_FILL_TIME_NEVER = 1,
299     H5D_FILL_TIME_IFSET = 2
300 }
301 
302 /* Values for fill value status */
303 enum H5D_fill_value_t {
304     H5D_FILL_VALUE_ERROR        =-1,
305     H5D_FILL_VALUE_UNDEFINED    =0,
306     H5D_FILL_VALUE_DEFAULT      =1,
307     H5D_FILL_VALUE_USER_DEFINED =2
308 }
309 
310     /*********************/
311     /* Public Prototypes */
312     /*********************/
313 
314     /* Define the operator function pointer for H5Diterate() */
315 extern(C)
316 {
317   alias H5D_operator_t = herr_t function(void *elem, hid_t type_id, int ndim, const hsize_t *point, void *operator_data);
318   /* Define the operator function pointer for H5Dscatter() */
319   alias H5D_scatter_func_t = herr_t function(const(void*) *src_buf/*out*/, size_t *src_buf_bytes_used/*out*/, void *op_data);
320   /* Define the operator function pointer for H5Dgather() */
321   alias H5D_gather_func_t = herr_t function(const(void*) dst_buf, size_t dst_buf_bytes_used, void *op_data);
322 }
323 
324 
325 
326 /* Information struct for attribute (for H5Aget_info/H5Aget_info_by_idx) */
327 align(1)
328 {
329   struct H5A_info_t {
330       hbool_t             corder_valid;   /* Indicate if creation order is valid */
331       H5O_msg_crt_idx_t   corder;         /* Creation order                 */
332       H5TCset             cset;           /* Character set of attribute name */
333       hsize_t             data_size;      /* Size of raw data		  */
334   }
335 }
336 // Typedef for H5Aiterate2() callbacks
337 extern(C)
338 {
339   alias H5A_operator2_t = herr_t function(hid_t location_id/*in*/, const(char*)attr_name/*in*/, const H5A_info_t *ainfo/*in*/, void *op_data/*in,out*/);
340 }
341 
342 
343 enum H5D_ONE_LINK_CHUNK_IO_THRESHOLD = 0;
344 enum H5D_MULTI_CHUNK_IO_COL_THRESHOLD = 60;
345 enum H5FDMPIO
346 {
347     Independent = 0,      /*zero is the default*/
348     Collective
349 }
350 
351 /* Type of chunked dataset I/O */
352 enum H5FDMPIOChunkOptions
353 {
354     Default = 0,
355     OneIO,         /*zero is the default*/
356     MultiIO
357 }
358 
359 
360 
361 
362 
363 static if (H5_HAVE_PARALLEL)
364 {
365   enum H5F_DEBUG = true;
366 }
367 
368   /* Global var whose value comes from environment variable */
369   /* (Defined in H5FDmpio.c) */
370   extern(C)
371   {
372     extern __gshared hbool_t H5FD_mpi_opt_types_g;
373     // Public function prototypes
374   }
375 
376 
377 
378 
379 /*
380  * These are the bits that can be passed to the `flags' argument of
381  * H5Fcreate() and H5Fopen(). Use the bit-wise OR operator (|) to combine
382  * them as needed.  As a side effect, they call H5check_version() to make sure
383  * that the application is compiled with a version of the hdf5 header files
384  * which are compatible with the library to which the application is linked.
385  * We're assuming that these constants are used rather early in the hdf5
386  * session.
387  *
388  */
389 enum H5F_ACC_RDONLY  = 0x0000u; /*absence of rdwr => rd-only */
390 enum H5F_ACC_RDWR    = 0x0001u; /*open for read and write    */
391 enum H5F_ACC_TRUNC   = 0x0002u; /*overwrite existing files   */
392 enum H5F_ACC_EXCL    = 0x0004u; /*fail if file already exists*/
393 enum H5F_ACC_DEBUG   = 0x0008u; /*print debug info       */
394 enum H5F_ACC_CREAT   = 0x0010u; /*create non-existing files  */
395 
396 /* Value passed to H5Pset_elink_acc_flags to cause flags to be taken from the
397  * parent file. */
398 enum H5F_ACC_DEFAULT = 0xffffu; /*ignore setting on lapl     */
399 
400 /* Flags for H5Fget_obj_count() & H5Fget_obj_ids() calls */
401 enum H5F_OBJ_FILE    = 0x0001u; /* File objects */
402 enum H5F_OBJ_DATASET = 0x0002u; /* Dataset objects */
403 enum H5F_OBJ_GROUP   = 0x0004u; /* Group objects */
404 enum H5F_OBJ_DATATYPE= 0x0008u; /* Named datatype objects */
405 enum H5F_OBJ_ATTR    = 0x0010u; /* Attribute objects */
406 enum H5F_OBJ_ALL     = (H5F_OBJ_FILE|H5F_OBJ_DATASET|H5F_OBJ_GROUP|H5F_OBJ_DATATYPE|H5F_OBJ_ATTR);
407 enum H5F_OBJ_LOCAL   = 0x0020u; /* Restrict search to objects opened through current file ID */
408                                 /* (as opposed to objects opened through any file ID accessing this file) */
409 
410 
411 enum H5F_FAMILY_DEFAULT = cast(hsize_t) 0;
412 
413 /*
414  * Use this constant string as the MPI_Info key to set H5Fmpio debug flags.
415  * To turn on H5Fmpio debug flags, set the MPI_Info value with this key to
416  * have the value of a string consisting of the characters that turn on the
417  * desired flags.
418  */
419 enum H5F_MPIO_DEBUG_KEY = "H5F_mpio_debug_key";
420 
421 /* The difference between a single file and a set of mounted files */
422 enum H5F_scope_t {
423     H5F_SCOPE_LOCAL = 0,    /*specified file handle only        */
424     H5F_SCOPE_GLOBAL    = 1     /*entire virtual file           */
425 }
426 
427 /* Unlimited file size for H5Pset_external() */
428 enum H5F_UNLIMITED = (cast(hsize_t)(-1L));
429 
430 /* How does file close behave?
431  * H5F_CLOSE_DEFAULT - Use the degree pre-defined by underlining VFL
432  * H5F_CLOSE_WEAK    - file closes only after all opened objects are closed
433  * H5F_CLOSE_SEMI    - if no opened objects, file is close; otherwise, file
434                close fails
435  * H5F_CLOSE_STRONG  - if there are opened objects, close them first, then
436                close file
437  */
438 enum H5F_close_degree_t {
439     H5F_CLOSE_DEFAULT   = 0,
440     H5F_CLOSE_WEAK      = 1,
441     H5F_CLOSE_SEMI      = 2,
442     H5F_CLOSE_STRONG    = 3
443 }
444 
445 /* Current "global" information about file */
446 /* (just size info currently) */
447 align(1)
448 {
449   struct H5F_info_t {
450       hsize_t     super_ext_size; /* Superblock extension size */
451       struct {
452       hsize_t     hdr_size;       /* Shared object header message header size */
453       H5_ih_info_t    msgs_info;      /* Shared object header message index & heap size */
454       };
455     }
456 }
457 
458 /*
459  * Types of allocation requests. The values larger than H5FD_MEM_DEFAULT
460  * should not change other than adding new types to the end. These numbers
461  * might appear in files.
462  *
463  * Note: please change the log VFD flavors array if you change this
464  * enumeration.
465  */
466 enum H5F_mem_t {
467     H5FD_MEM_NOLIST     = -1,   /* Data should not appear in the free list.
468                                  * Must be negative.
469                                  */
470     H5FD_MEM_DEFAULT    = 0,    /* Value not yet set.  Can also be the
471                                  * datatype set in a larger allocation
472                                  * that will be suballocated by the library.
473                                  * Must be zero.
474                                  */
475     H5FD_MEM_SUPER      = 1,    /* Superblock data */
476     H5FD_MEM_BTREE      = 2,    /* B-tree data */
477     H5FD_MEM_DRAW       = 3,    /* Raw data (content of datasets, etc.) */
478     H5FD_MEM_GHEAP      = 4,    /* Global heap data */
479     H5FD_MEM_LHEAP      = 5,    /* Local heap data */
480     H5FD_MEM_OHDR       = 6,    /* Object header data */
481 
482     H5FD_MEM_NTYPES             /* Sentinel value - must be last */
483 }
484 
485 /* Library's file format versions */
486 enum H5F_libver_t {
487     H5F_LIBVER_EARLIEST,        /* Use the earliest possible format for storing objects */
488     H5F_LIBVER_LATEST           /* Use the latest possible format available for storing objects*/
489 }
490 
491     /* Define file format version for 1.8 to prepare for 1.10 release.  
492      * (Not used anywhere now)*/
493     // alias H5F_LIBVER_18 H5F_LIBVER_LATEST
494 
495     /* Functions in H5F.c */
496 version(Posix) {
497 }
498 
499 enum H5GStorageType {
500     Unknown = -1,  /* Unknown link storage type  */
501     SymbolTable,      /* Links in group are stored with a "symbol table" */
502                                         /* (this is sometimes called "old-style" groups) */
503     Compact,   /* Links are stored in object header */
504     Dense    /* Links are stored in fractal heap & indexed with v2 B-tree */
505 }
506 
507 /* Information struct for group (for H5Gget_info/H5Gget_info_by_name/H5Gget_info_by_idx) */
508 struct H5GInfo {
509     align(1)
510     {
511       H5GStorageType  storage_type;    /* Type of storage for links in group */
512       hsize_t   nlinks;               /* Number of links in group */
513       long     max_corder;             /* Current max. creation order value for group */
514       hbool_t     mounted;             /* Whether group has a file mounted on it */
515   }
516 }
517 
518 /*
519  * Library type values.  Start with `1' instead of `0' because it makes the
520  * tracing output look better when hid_t values are large numbers.  Change the
521  * TYPE_BITS in H5I.c if the MAXID gets larger than 32 (an assertion will
522  * fail otherwise).
523  *
524  * When adding types here, add a section to the 'misc19' test in test/tmisc.c
525  * to verify that the H5I{inc|dec|get}_ref() routines work correctly with in.
526  *
527  */
528 
529 enum H5IType
530 {
531     Uninitialized    = (-2), /*uninitialized type                */
532     BadID       = (-1), /*invalid Type                  */
533     FileObject        = 1,    /*type ID for File objects          */
534     Group,              /*type ID for Group objects         */
535     DataType,           /*type ID for Datatype objects          */
536     DataSpace,          /*type ID for Dataspace objects         */
537     DataSet,            /*type ID for Dataset objects           */
538     Attr,               /*type ID for Attribute objects         */
539     Reference,          /*type ID for Reference objects         */
540     VirtualFileLayer,            /*type ID for virtual file layer        */
541     GenericPropClass,            /*type ID for generic property list classes */
542     GenericPropList,            /*type ID for generic property lists        */
543     ErrorClass,            /*type ID for error classes         */
544     ErrorMsg,              /*type ID for error messages            */
545     ErrorStack,            /*type ID for error stacks          */
546     Numtypes              /*number of library types, MUST BE LAST!    */
547 }
548 
549 /* Type of atoms to return to users */
550 alias hid_t = int;
551 enum H5_SIZEOF_HID_T = H5_SIZEOF_INT;
552 
553 /* An invalid object ID. This is also negative for error return. */
554 enum H5I_INVALID_HID = (-1);
555 
556 /*
557  * Function for freeing objects. This function will be called with an object
558  * ID type number and a pointer to the object. The function should free the
559  * object and return non-negative to indicate that the object
560  * can be removed from the ID type. If the function returns negative
561  * (failure) then the object will remain in the ID type.
562  */
563 extern(C)
564 {
565   alias H5I_free_t = herr_t function(void*);
566 
567   /* Type of the function to compare objects & keys */
568   alias H5I_search_func_t = int function(void *obj, hid_t id, void *key);
569 }
570 //Public API functions
571 
572 enum H5L_MAX_LINK_NAME_LEN  = (cast(uint32_t)(-1));  /* (4GB - 1) */
573 enum H5L_SAME_LOC = 0;
574 enum H5L_LINK_CLASS_T_VERS = 0;
575 
576 /* Link class types.
577  * Values less than 64 are reserved for the HDF5 library's internal use.
578  * Values 64 to 255 are for "user-defined" link class types; these types are
579  * defined by HDF5 but their behavior can be overridden by users.
580  */
581 enum H5LType {
582     Error = (-1),      /* Invalid link type id         */
583     Hard  = 0,          /* Hard link id                 */
584     Soft  = 1,          /* Soft link id                 */
585     External  = 64,     /* External link id             */
586     Max = 255          /* Maximum link type id         */
587 };
588 enum H5L_TYPE_BUILTIN_MAX = H5LType.Soft;      /* Maximum value link value for "built-in" link types */
589 enum H5L_TYPE_UD_MIN = H5LType.External;  /* Link ids at or above this value are "user-defined" link types. */
590 
591 /* Information struct for link (for H5Lget_info/H5Lget_info_by_idx) */
592   struct H5LInfo {
593       H5LType          type;           /* Type of link                   */
594       hbool_t             corder_valid;   /* Indicate if creation order is valid */
595       int64_t             corder;         /* Creation order                 */
596       H5TCset          cset;           /* Character set of link name     */
597       union U {
598           haddr_t         address;        /* Address hard link points to    */
599           size_t          val_size;       /* Size of a soft link or UD link value */
600       };
601       U u;
602   }
603 
604 extern(C)
605 {
606 /* The H5L_class_t struct can be used to override the behavior of a
607  * "user-defined" link class. Users should populate the struct with callback
608  * functions defined below.
609  */
610 /* Callback prototypes for user-defined links */
611 /* Link creation callback */
612 alias H5L_create_func_t = herr_t function(const(char*)link_name, hid_t loc_group, const(void*) lnkdata, size_t lnkdata_size, hid_t lcpl_id);
613 
614 /* Callback for when the link is moved */
615 alias H5L_move_func_t = herr_t function(const(char*)new_name, hid_t new_loc, const(void*) lnkdata, size_t lnkdata_size);
616 
617 /* Callback for when the link is copied */
618 alias H5L_copy_func_t = herr_t function(const(char*)new_name, hid_t new_loc, const(void*) lnkdata, size_t lnkdata_size);
619 
620 /* Callback during link traversal */
621 alias H5L_traverse_func_t = herr_t function(const(char *)link_name, hid_t cur_group, const(void*) lnkdata, size_t lnkdata_size, hid_t lapl_id);
622 
623 /* Callback for when the link is deleted */
624 alias H5L_delete_func_t = herr_t function(const(char *)link_name, hid_t file, const(void*) lnkdata, size_t lnkdata_size);
625 
626 /* Callback for querying the link */
627 /* Returns the size of the buffer needed */
628 alias H5L_query_func_t = ssize_t function(const(char *)link_name, const(void*) lnkdata, size_t lnkdata_size, void *buf /*out*/, size_t buf_size);
629 
630 /* User-defined link types */
631   struct H5L_class_t {
632       int _version;                    /* Version number of this struct        */
633       H5LType id;                  /* Link type ID                         */
634       const(char*)comment;            /* Comment for debugging                */
635       H5L_create_func_t create_func;  /* Callback during link creation        */
636       H5L_move_func_t move_func;      /* Callback after moving link           */
637       H5L_copy_func_t copy_func;      /* Callback after copying link          */
638       H5L_traverse_func_t trav_func;  /* Callback during link traversal       */
639       H5L_delete_func_t del_func;     /* Callback for link deletion           */
640       H5L_query_func_t query_func;    /* Callback for queries                 */
641   }
642 
643 /* Prototype for H5Literate/H5Literate_by_name() operator */
644 alias H5L_iterate_t = herr_t function(hid_t group, const(char*)name, const H5LInfo *info, void *op_data);
645 
646 /* Callback for external link traversal */
647 alias H5L_elink_traverse_t = herr_t function(const(char*)parent_file_name,
648     const(char*)parent_group_name, const(char*)child_file_name,
649     const(char*)child_object_name, uint *acc_flags, hid_t fapl_id,
650     void *op_data);
651 }
652 
653 
654 
655 
656 extern(C)
657 {
658 
659   /*****************/
660   /* Public Macros */
661   /*****************/
662 
663   /* Flags for object copy (H5Ocopy) */
664   enum H5O_COPY_SHALLOW_HIERARCHY_FLAG = (0x0001u);   /* Copy only immediate members */
665   enum H5O_COPY_EXPAND_SOFT_LINK_FLAG  = (0x0002u);   /* Expand soft links into new objects */
666   enum H5O_COPY_EXPAND_EXT_LINK_FLAG   = (0x0004u);   /* Expand external links into new objects */
667   enum H5O_COPY_EXPAND_REFERENCE_FLAG  = (0x0008u);   /* Copy objects that are pointed by references */
668   enum H5O_COPY_WITHOUT_ATTR_FLAG      = (0x0010u);   /* Copy object without copying attributes */
669   enum H5O_COPY_PRESERVE_NULL_FLAG     = (0x0020u);   /* Copy NULL messages (empty space) */
670   enum H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG = (0x0040u);   /* Merge committed datatypes in dest file */
671   enum H5O_COPY_ALL                    =(0x007Fu);   /* All object copying flags (for internal checking) */
672 
673   /* Flags for shared message indexes.
674    * Pass these flags in using the mesg_type_flags parameter in
675    * H5P_set_shared_mesg_index.
676    * (Developers: These flags correspond to object header message type IDs,
677    * but we need to assign each kind of message to a different bit so that
678    * one index can hold multiple types.)
679    */
680   enum H5O_SHMESG_NONE_FLAG    = 0x0000;          /* No shared messages */
681   enum H5O_SHMESG_SDSPACE_FLAG = (cast(uint)1 << 0x0001); /* Simple Dataspace Message.  */
682   enum H5O_SHMESG_DTYPE_FLAG   = (cast(uint)1 << 0x0003); /* Datatype Message.  */
683   enum H5O_SHMESG_FILL_FLAG    = (cast(uint)1 << 0x0005); /* Fill Value Message. */
684   enum H5O_SHMESG_PLINE_FLAG   = (cast(uint)1 << 0x000b); /* Filter pipeline message.  */
685   enum H5O_SHMESG_ATTR_FLAG    = (cast(uint)1 << 0x000c); /* Attribute Message.  */
686   enum H5O_SHMESG_ALL_FLAG     = (H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_FILL_FLAG | H5O_SHMESG_PLINE_FLAG | H5O_SHMESG_ATTR_FLAG);
687 
688   /* Object header status flag definitions */
689   enum H5O_HDR_CHUNK0_SIZE             = 0x03;    /* 2-bit field indicating # of bytes to store the size of chunk 0's data */
690   enum H5O_HDR_ATTR_CRT_ORDER_TRACKED  = 0x04;    /* Attribute creation order is tracked */
691   enum H5O_HDR_ATTR_CRT_ORDER_INDEXED  = 0x08;    /* Attribute creation order has index */
692   enum H5O_HDR_ATTR_STORE_PHASE_CHANGE = 0x10;    /* Non-default attribute storage phase change values stored */
693   enum H5O_HDR_STORE_TIMES             = 0x20;    /* Store access, modification, change & birth times for object */
694   enum H5O_HDR_ALL_FLAGS = (H5O_HDR_CHUNK0_SIZE | H5O_HDR_ATTR_CRT_ORDER_TRACKED | H5O_HDR_ATTR_CRT_ORDER_INDEXED | H5O_HDR_ATTR_STORE_PHASE_CHANGE | H5O_HDR_STORE_TIMES);
695 
696   /* Maximum shared message values.  Number of indexes is 8 to allow room to add
697    * new types of messages.
698    */
699   enum H5O_SHMESG_MAX_NINDEXES = 8;
700   enum H5O_SHMESG_MAX_LIST_SIZE = 5000;
701 
702   /*******************/
703   /* Public Typedefs */
704   /*******************/
705 
706   /* Types of objects in file */
707   enum H5OType {
708       Unknown = -1,  /* Unknown object type      */
709       Group,         /* Object is a group        */
710       Dataset,       /* Object is a dataset      */
711       NamedDataType,    /* Object is a named data type  */
712       TypeNTypes             /* Number of different object types (must be last!) */
713   }
714 
715   /* Information struct for object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx) */
716   align(1)
717   {
718     struct H5O_hdr_info_t {
719         uint _version;      /* Version number of header format in file */
720         uint nmesgs;        /* Number of object header messages */
721         uint nchunks;       /* Number of object header chunks */
722         uint flags;             /* Object header status flags */
723         struct space {
724             hsize_t total;      /* Total space for storing object header in file */
725             hsize_t meta;       /* Space within header for object header metadata information */
726             hsize_t mesg;       /* Space within header for actual message information */
727             hsize_t free;       /* Free space within object header */
728         }
729         struct mesg {
730             uint64_t present;   /* Flags to indicate presence of message type in header */
731             uint64_t _shared;   /* Flags to indicate message type is shared in header */
732         }
733     }
734   }
735 
736   /* Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx) */
737   align(1)
738     struct H5OInfo {
739       ulong    fileno;     /* File number that object is located in */
740       haddr_t         addr;       /* Object address in file   */
741       H5OType       type;       /* Basic object type (group, dataset, etc.) */
742       uint        rc;     /* Reference count of object    */
743       time_t      atime;      /* Access time          */
744       time_t      mtime;      /* Modification time        */
745       time_t      ctime;      /* Change time          */
746       time_t      btime;      /* Birth time           */
747       hsize_t         num_attrs;  /* # of attributes attached to object */
748       H5O_hdr_info_t      hdr;            /* Object header information */
749       /* Extra metadata storage for obj & attributes */
750       struct meta_size {
751           H5_ih_info_t   obj;             /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */
752           H5_ih_info_t   attr;            /* v2 B-tree & heap for attributes */
753       }
754     }
755 }
756 
757 extern(C)
758 {
759     /* Typedef for message creation indexes */
760     alias H5O_msg_crt_idx_t = uint32_t;
761 
762     /* Prototype for H5Ovisit/H5Ovisit_by_name() operator */
763     alias H5O_iterate_t = herr_t function(hid_t obj, const(char*)name, const H5OInfo  *info, void *op_data);
764   }
765     enum H5O_mcdt_search_ret_t {
766         H5O_MCDT_SEARCH_ERROR = -1, /* Abort H5Ocopy */
767         H5O_MCDT_SEARCH_CONT,   /* Continue the global search of all committed datatypes in the destination file */
768         H5O_MCDT_SEARCH_STOP    /* Stop the search, but continue copying.  The committed datatype will be copied but not merged. */
769     };
770 
771     /* Callback to invoke when completing the search for a matching committed datatype from the committed dtype list */
772 extern(C)
773 {
774   alias H5O_mcdt_search_cb_t = H5O_mcdt_search_ret_t function(void *op_data);
775 }
776 extern(C)
777 {
778 
779   
780 
781   /* Common creation order flags (for links in groups and attributes on objects) */
782   enum  H5P_CRT_ORDER_TRACKED = 0x0001;
783   enum  H5P_CRT_ORDER_INDEXED = 0x0002;
784 
785   /*******************/
786   /* Public Typedefs */
787   /*******************/
788 
789   /* Define property list class callback function pointer types */
790   alias H5P_cls_create_func_t = herr_t function(hid_t prop_id, void *create_data);
791   alias H5P_cls_copy_func_t = herr_t function(hid_t new_prop_id, hid_t old_prop_id, void *copy_data);
792   alias H5P_cls_close_func_t = herr_t function(hid_t prop_id, void *close_data);
793 
794   /* Define property list callback function pointer types */
795   alias H5P_prp_cb1_t = herr_t function(const(char*)name, size_t size, void *value);
796   alias H5P_prp_cb2_t = herr_t function(hid_t prop_id, const(char*)name, size_t size, void *value);
797   alias H5P_prp_create_func_t = H5P_prp_cb1_t;
798   alias H5P_prp_set_func_t = H5P_prp_cb2_t;
799   alias H5P_prp_get_func_t = H5P_prp_cb2_t;
800   alias H5P_prp_delete_func_t = H5P_prp_cb2_t;
801   alias H5P_prp_copy_func_t = H5P_prp_cb1_t;
802   alias H5P_prp_compare_func_t = int function(const(void*) value1, const(void*) value2, size_t size);
803   alias H5P_prp_close_func_t = H5P_prp_cb1_t;
804 
805   /* Define property list iteration function type */
806   alias H5P_iterate_t = herr_t function(hid_t id, const(char*)name, void *iter_data);
807 }
808 
809 /* Actual IO mode property */
810 enum H5D_mpio_actual_chunk_opt_mode_t {
811     /* The default value, H5D_MPIO_NO_CHUNK_OPTIMIZATION, is used for all I/O
812      * operations that do not use chunk optimizations, including non-collective
813      * I/O and contiguous collective I/O.
814      */
815     H5D_MPIO_NO_CHUNK_OPTIMIZATION = 0,
816     H5D_MPIO_LINK_CHUNK,
817     H5D_MPIO_MULTI_CHUNK
818 }
819 
820 enum H5D_mpio_actual_io_mode_t {
821     /* The following four values are conveniently defined as a bit field so that
822      * we can switch from the default to indpendent or collective and then to
823      * mixed without having to check the original value. 
824      * 
825      * NO_COLLECTIVE means that either collective I/O wasn't requested or that 
826      * no I/O took place.
827      *
828      * CHUNK_INDEPENDENT means that collective I/O was requested, but the
829      * chunk optimization scheme chose independent I/O for each chunk.
830      */
831     H5D_MPIO_NO_COLLECTIVE = 0x0,
832     H5D_MPIO_CHUNK_INDEPENDENT = 0x1,
833     H5D_MPIO_CHUNK_COLLECTIVE = 0x2,
834     H5D_MPIO_CHUNK_MIXED = 0x1 | 0x2,
835 
836     /* The contiguous case is separate from the bit field. */
837     H5D_MPIO_CONTIGUOUS_COLLECTIVE = 0x4
838 }
839 
840 /* Broken collective IO property */
841 enum H5D_mpio_no_collective_cause_t {
842     H5D_MPIO_COLLECTIVE = 0x00,
843     H5D_MPIO_SET_INDEPENDENT = 0x01,
844     H5D_MPIO_DATATYPE_CONVERSION = 0x02,
845     H5D_MPIO_DATA_TRANSFORMS = 0x04,
846     H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED = 0x08,
847     H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES = 0x10,
848     H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET = 0x20,
849     H5D_MPIO_FILTERS = 0x40
850 }
851 
852     /********************/
853     /* Public Variables */
854     /********************/
855 
856     /* Property list class IDs */
857     /* (Internal to library, do not use!  Use macros above) */
858 /+
859 extern(C)
860 {
861     extern __gshared hid_t H5P_CLS_ROOT_g;
862     extern __gshared hid_t H5P_CLS_OBJECT_CREATE_g;
863     extern __gshared hid_t H5P_CLS_FILE_CREATE_g;
864     extern __gshared hid_t H5P_CLS_FILE_ACCESS_g;
865     extern __gshared hid_t H5P_CLS_DATASET_CREATE_g;
866     extern __gshared hid_t H5P_CLS_DATASET_ACCESS_g;
867     extern __gshared hid_t H5P_CLS_DATASET_XFER_g;
868     extern __gshared hid_t H5P_CLS_FILE_MOUNT_g;
869     extern __gshared hid_t H5P_CLS_GROUP_CREATE_g;
870     extern __gshared hid_t H5P_CLS_GROUP_ACCESS_g;
871     extern __gshared hid_t H5P_CLS_DATATYPE_CREATE_g;
872     extern __gshared hid_t H5P_CLS_DATATYPE_ACCESS_g;
873     extern __gshared hid_t H5P_CLS_STRING_CREATE_g;
874     extern __gshared hid_t H5P_CLS_ATTRIBUTE_CREATE_g;
875     extern __gshared hid_t H5P_CLS_OBJECT_COPY_g;
876     extern __gshared hid_t H5P_CLS_LINK_CREATE_g;
877     extern __gshared hid_t H5P_CLS_LINK_ACCESS_g;
878 
879     /* Default roperty list IDs */
880     /* (Internal to library, do not use!  Use macros above) */
881     extern __gshared hid_t H5P_LST_FILE_CREATE_g;
882     extern __gshared hid_t H5P_LST_FILE_ACCESS_g;
883     extern __gshared hid_t H5P_LST_DATASET_CREATE_g;
884     extern __gshared hid_t H5P_LST_DATASET_ACCESS_g;
885     extern __gshared hid_t H5P_LST_DATASET_XFER_g;
886     extern __gshared hid_t H5P_LST_FILE_MOUNT_g;
887     extern __gshared hid_t H5P_LST_GROUP_CREATE_g;
888     extern __gshared hid_t H5P_LST_GROUP_ACCESS_g;
889     extern __gshared hid_t H5P_LST_DATATYPE_CREATE_g;
890     extern __gshared hid_t H5P_LST_DATATYPE_ACCESS_g;
891     extern __gshared hid_t H5P_LST_ATTRIBUTE_CREATE_g;
892     extern __gshared hid_t H5P_LST_OBJECT_COPY_g;
893     extern __gshared hid_t H5P_LST_LINK_CREATE_g;
894     extern __gshared hid_t H5P_LST_LINK_ACCESS_g;
895 }
896 +/
897 enum H5RType
898 {
899     BadType=-1,   /*invalid Reference Type                     */
900     ObjectRef,                 /*Object reference                           */
901     DatasetRegion,         /*Dataset Region Reference                   */
902     MaxType                /*highest type (Invalid as true type)      */
903 }
904 
905 /* Note! Be careful with the sizes of the references because they should really
906  * depend on the run-time values in the file.  Unfortunately, the arrays need
907  * to be defined at compile-time, so we have to go with the worst case sizes for
908  * them.  -QAK
909  */
910 enum  H5R_OBJ_REF_BUF_SIZE =haddr_t.sizeof;
911 /* Object reference structure for user's code */
912 alias  hobj_ref_t= haddr_t ; /* Needs to be large enough to store largest haddr_t in a worst case machine (ie. 8 bytes currently) */
913 
914 enum H5R_DSET_REG_REF_BUF_SIZE  =haddr_t.sizeof+4;
915 /* 4 is used instead of sizeof(int) to permit portability between
916    the Crays and other machines (the heap ID is always encoded as an int32 anyway)
917 */
918 /* Dataset Region reference structure for user's code */
919 alias hdset_reg_ref_t = ubyte[H5R_DSET_REG_REF_BUF_SIZE];/* Buffer to store heap ID and index */
920 /* Needs to be large enough to store largest haddr_t in a worst case machine (ie. 8 bytes currently) plus an int */
921 
922 
923 
924 /* Define atomic datatypes */
925 enum H5S_ALL = 0;
926 enum H5S_UNLIMITED = (cast(hsize_t)cast(hssize_t)(-1));
927 
928 /* Define user-level maximum number of dimensions */
929 enum H5S_MAX_RANK = 32;
930 
931 /* Different types of dataspaces */
932 enum H5SClass {
933     None         = -1,  /*error                                      */
934     Scalar           = 0,   /*scalar variable                            */
935     Simple           = 1,   /*simple data space                          */
936     Null             = 2    /*null data space                            */
937 }
938 
939 /* Different ways of combining selections */
940 enum H5SSeloper {
941     Noop      = -1,  /* error                                     */
942     Set       = 0,   /* Select "set" operation            */
943     Or,
944     And,
945     Xor,
946     NotB,
947     NotA,
948     Append,
949     Prepend,
950     Invalid,
951 }
952 
953 enum {
954     H5S_SELECT_NOOP      = -1,  /* error                                     */
955     H5S_SELECT_SET       = 0,   /* Select "set" operation            */
956     H5S_SELECT_OR,              /* Binary "or" operation for hyperslabs
957                                  * (add new selection to existing selection)
958                                  * Original region:  AAAAAAAAAA
959                                  * New region:             BBBBBBBBBB
960                                  * A or B:           CCCCCCCCCCCCCCCC
961                                  */
962     H5S_SELECT_AND,             /* Binary "and" operation for hyperslabs
963                                  * (only leave overlapped regions in selection)
964                                  * Original region:  AAAAAAAAAA
965                                  * New region:             BBBBBBBBBB
966                                  * A and B:                CCCC
967                                  */
968     H5S_SELECT_XOR,             /* Binary "xor" operation for hyperslabs
969                                  * (only leave non-overlapped regions in selection)
970                                  * Original region:  AAAAAAAAAA
971                                  * New region:             BBBBBBBBBB
972                                  * A xor B:          CCCCCC    CCCCCC
973                                  */
974     H5S_SELECT_NOTB,            /* Binary "not" operation for hyperslabs
975                                  * (only leave non-overlapped regions in original selection)
976                                  * Original region:  AAAAAAAAAA
977                                  * New region:             BBBBBBBBBB
978                                  * A not B:          CCCCCC
979                                  */
980     H5S_SELECT_NOTA,            /* Binary "not" operation for hyperslabs
981                                  * (only leave non-overlapped regions in new selection)
982                                  * Original region:  AAAAAAAAAA
983                                  * New region:             BBBBBBBBBB
984                                  * B not A:                    CCCCCC
985                                  */
986     H5S_SELECT_APPEND,          /* Append elements to end of point selection */
987     H5S_SELECT_PREPEND,         /* Prepend elements to beginning of point selection */
988     H5S_SELECT_INVALID          /* Invalid upper bound on selection operations */
989 }
990 
991 /* Enumerated type for the type of selection */
992 enum H5S_sel_type {
993     H5S_SEL_ERROR   = -1,   /* Error            */
994     H5S_SEL_NONE    = 0,    /* Nothing selected         */
995     H5S_SEL_POINTS  = 1,    /* Sequence of points selected  */
996     H5S_SEL_HYPERSLABS  = 2,    /* "New-style" hyperslab selection defined  */
997     H5S_SEL_ALL     = 3,    /* Entire extent selected   */
998     H5S_SEL_N           /*THIS MUST BE LAST     */
999 }
1000 
1001 /* These are the various classes of datatypes */
1002 /* If this goes over 16 types (0-15), the file format will need to change) */
1003 enum H5TClass {
1004     None         = -1,  /*error                                      */
1005     Integer          = 0,   /*integer types                              */
1006     Float            = 1,   /*floating-point types                       */
1007     Time             = 2,   /*date and time types                        */
1008     String           = 3,   /*character string types                     */
1009     Bitfield         = 4,   /*bit field types                            */
1010     Opaque           = 5,   /*opaque types                               */
1011     Compound         = 6,   /*compound types                             */
1012     Reference        = 7,   /*reference types                            */
1013     Enum        = 8,   /*enumeration types                          */
1014     Vlen         = 9,   /*Variable-Length types                      */
1015     Array            = 10,  /*Array types                                */
1016     Nclasses                /*this must be last                          */
1017 }
1018 
1019 /* Byte orders */
1020 enum H5TByteOrder {
1021     Error      = -1,  /*error                                      */
1022     LE         = 0,   /*little endian                              */
1023     BE         = 1,   /*bit endian                                 */
1024     Vax        = 2,   /*VAX mixed endian                           */
1025     Mixed      = 3,   /*Compound type with mixed member orders     */
1026     None       = 4    /*no particular order (strings, bits,..)     */
1027     /*H5T_ORDER_NONE must be last */
1028 }
1029 
1030 /* Types of integer sign schemes */
1031 enum H5T_sign_t {
1032     H5T_SGN_ERROR        = -1,  /*error                                      */
1033     H5T_SGN_NONE         = 0,   /*this is an unsigned type                   */
1034     H5T_SGN_2            = 1,   /*two's complement                           */
1035 
1036     H5T_NSGN             = 2    /*this must be last!                         */
1037 }
1038 
1039 /* Floating-point normalization schemes */
1040 enum H5T_norm_t {
1041     H5T_NORM_ERROR       = -1,  /*error                                      */
1042     H5T_NORM_IMPLIED     = 0,   /*msb of mantissa isn't stored, always 1     */
1043     H5T_NORM_MSBSET      = 1,   /*msb of mantissa is always 1                */
1044     H5T_NORM_NONE        = 2    /*not normalized                             */
1045     /*H5T_NORM_NONE must be last */
1046 }
1047 
1048 /*
1049  * Character set to use for text strings.  Do not change these values since
1050  * they appear in HDF5 files!
1051  */
1052 enum H5TCset {
1053     Error       = -1,  /*error                                      */
1054     ASCII       = 0,   /*US ASCII                                   */
1055     UTF8        = 1,   /*UTF-8 Unicode encoding             */
1056     Reserved2  = 2,   /*reserved for later use             */
1057     Reserved3  = 3,   /*reserved for later use             */
1058     Reserved4  = 4,   /*reserved for later use             */
1059     Reserved5  = 5,   /*reserved for later use             */
1060     Reserved6  = 6,   /*reserved for later use             */
1061     Reserved7  = 7,   /*reserved for later use             */
1062     Reserved8  = 8,   /*reserved for later use             */
1063     Reserved9  = 9,   /*reserved for later use             */
1064     Reserved10 = 10,  /*reserved for later use             */
1065     Reserved11 = 11,  /*reserved for later use             */
1066     Reserved12 = 12,  /*reserved for later use             */
1067     Reserved13 = 13,  /*reserved for later use             */
1068     Reserved14 = 14,  /*reserved for later use             */
1069     Reserved15 = 15   /*reserved for later use             */
1070 }
1071 
1072 enum H5T_NCSET = H5TCset.Reserved2 ; /*Number of character sets actually defined  */
1073 
1074 /*
1075  * Type of padding to use in character strings.  Do not change these values
1076  * since they appear in HDF5 files!
1077  */
1078 enum H5TString {
1079     Error        = -1,  /*error                                      */
1080     Nullterm     = 0,   /*null terminate like in C                   */
1081     Nullpas      = 1,   /*pad with nulls                             */
1082     Spacepad     = 2,   /*pad with spaces like in Fortran            */
1083     Reserved3   = 3,   /*reserved for later use             */
1084     Reserved4   = 4,   /*reserved for later use             */
1085     Reserved5   = 5,   /*reserved for later use             */
1086     Reserved6   = 6,   /*reserved for later use             */
1087     Reserved7   = 7,   /*reserved for later use             */
1088     Reserved8   = 8,   /*reserved for later use             */
1089     Reserved9   = 9,   /*reserved for later use             */
1090     Reserved10  = 10,  /*reserved for later use             */
1091     Reserved11  = 11,  /*reserved for later use             */
1092     Reserved12  = 12,  /*reserved for later use             */
1093     Reserved13  = 13,  /*reserved for later use             */
1094     Reserved14  = 14,  /*reserved for later use             */
1095     Reserved15  = 15   /*reserved for later use             */
1096 }
1097 
1098 enum H5T_NSTR = H5TString.Reserved3; /*num H5TString types actually defined         */
1099 
1100 /* Type of padding to use in other atomic types */
1101 enum H5T_pad_t {
1102     H5T_PAD_ERROR        = -1,  /*error                                      */
1103     H5T_PAD_ZERO         = 0,   /*always set to zero                         */
1104     H5T_PAD_ONE          = 1,   /*always set to one                          */
1105     H5T_PAD_BACKGROUND   = 2,   /*set to background value                    */
1106 
1107     H5T_NPAD             = 3    /*THIS MUST BE LAST                          */
1108 }
1109 
1110 /* Commands sent to conversion functions */
1111 enum H5T_cmd_t {
1112     H5T_CONV_INIT   = 0,    /*query and/or initialize private data       */
1113     H5T_CONV_CONV   = 1,    /*convert data from source to dest datatype */
1114     H5T_CONV_FREE   = 2 /*function is being removed from path        */
1115 }
1116 
1117 /* How is the `bkg' buffer used by the conversion function? */
1118 enum H5T_bkg_t {
1119     H5T_BKG_NO      = 0,    /*background buffer is not needed, send NULL */
1120     H5T_BKG_TEMP    = 1,    /*bkg buffer used as temp storage only       */
1121     H5T_BKG_YES     = 2 /*init bkg buf with data before conversion   */
1122 }
1123 
1124 /* Type conversion client data */
1125   struct H5T_cdata_t {
1126       H5T_cmd_t       command;/*what should the conversion function do?    */
1127       H5T_bkg_t       need_bkg;/*is the background buffer needed?      */
1128       hbool_t     recalc; /*recalculate private data           */
1129       void        *priv;  /*private data                   */
1130   }
1131 
1132 /* Conversion function persistence */
1133 enum H5T_pers_t {
1134     H5T_PERS_DONTCARE   = -1,   /*wild card                  */
1135     H5T_PERS_HARD   = 0,    /*hard conversion function           */
1136     H5T_PERS_SOFT   = 1     /*soft conversion function           */
1137 }
1138 
1139 /* The order to retrieve atomic native datatype */
1140 enum H5TDirection
1141 {
1142     Default     = 0,    /*default direction is inscendent            */
1143     Ascend      = 1,    /*in inscendent order                        */
1144     Descend     = 2     /*in descendent order                        */
1145 }
1146 
1147 /* The exception type passed into the conversion callback function */
1148 enum H5T_conv_except_t {
1149     H5T_CONV_EXCEPT_RANGE_HI       = 0,   /*source value is greater than destination's range */
1150     H5T_CONV_EXCEPT_RANGE_LOW      = 1,   /*source value is less than destination's range    */
1151     H5T_CONV_EXCEPT_PRECISION      = 2,   /*source value loses precision in destination      */
1152     H5T_CONV_EXCEPT_TRUNCATE       = 3,   /*source value is truncated in destination         */
1153     H5T_CONV_EXCEPT_PINF           = 4,   /*source value is positive infinity(floating number) */
1154     H5T_CONV_EXCEPT_NINF           = 5,   /*source value is negative infinity(floating number) */
1155     H5T_CONV_EXCEPT_NAN            = 6    /*source value is NaN(floating number)             */
1156 }
1157 
1158 /* The return value from conversion callback function H5T_conv_except_func_t */
1159 enum H5T_conv_ret_t {
1160     H5T_CONV_ABORT      = -1,   /*abort conversion                           */
1161     H5T_CONV_UNHANDLED  = 0,    /*callback function failed to handle the exception      */
1162     H5T_CONV_HANDLED    = 1     /*callback function handled the exception successfully  */
1163 }
1164 
1165 /* Variable Length Datatype struct in memory */
1166 /* (This is only used for VL sequences, not VL strings, which are stored in char *'s) */
1167   struct hvl_t {
1168       size_t len; /* Length of VL data (in base type units) */
1169       void *p;    /* Pointer to VL data */
1170   }
1171 
1172 /* Variable Length String information */
1173 enum H5T_VARIABLE = (cast(size_t)(-1));  /* Indicate that a string is variable length (null-terminated in C, instead of fixed length) */
1174 
1175 /* Opaque information */
1176 enum H5T_OPAQUE_TAG_MAX = 256; /* Maximum length of an opaque tag */
1177                                         /* This could be raised without too much difficulty */
1178 
1179 extern(C)
1180 {
1181     /* All datatype conversion functions are... */
1182     alias H5T_conv_t = herr_t function(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
1183           size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf,
1184           void *bkg, hid_t dset_xfer_plist);
1185 
1186     /* Exception handler.  If an exception like overflow happenes during conversion,
1187      * this function is called if it's registered through H5Pset_type_conv_cb.
1188      */
1189     alias H5T_conv_except_func_t = H5T_conv_ret_t function(H5T_conv_except_t except_type,
1190         hid_t src_id, hid_t dst_id, void *src_buf, void *dst_buf, void *user_data);
1191 
1192 
1193     /*
1194      * The IEEE floating point types in various byte orders.
1195      */
1196     alias H5T_IEEE_F32BE = H5T_IEEE_F32BE_g;
1197     alias H5T_IEEE_F32LE = H5T_IEEE_F32LE_g;
1198     alias H5T_IEEE_F64BE = H5T_IEEE_F64BE_g;
1199     alias H5T_IEEE_F64LE = H5T_IEEE_F64LE_g;
1200     extern __gshared hid_t H5T_IEEE_F32BE_g;
1201     extern __gshared hid_t H5T_IEEE_F32LE_g;
1202     extern __gshared hid_t H5T_IEEE_F64BE_g;
1203     extern __gshared hid_t H5T_IEEE_F64LE_g;
1204 
1205     /*
1206      * These are "standard" types.  For instance, signed (2's complement) and
1207      * unsigned integers of various sizes and byte orders.
1208      */
1209     alias H5T_STD_I8BE = H5T_STD_I8BE_g;
1210     alias H5T_STD_I8LE = H5T_STD_I8LE_g;
1211     alias H5T_STD_I16BE = H5T_STD_I16BE_g;
1212     alias H5T_STD_I16LE = H5T_STD_I16LE_g;
1213     alias H5T_STD_I32BE = H5T_STD_I32BE_g;
1214     alias H5T_STD_I32LE = H5T_STD_I32LE_g;
1215     alias H5T_STD_I64BE = H5T_STD_I64BE_g;
1216     alias H5T_STD_I64LE = H5T_STD_I64LE_g;
1217     alias H5T_STD_U8BE = H5T_STD_U8BE_g;
1218     alias H5T_STD_U8LE = H5T_STD_U8LE_g;
1219     alias H5T_STD_U16BE = H5T_STD_U16BE_g;
1220     alias H5T_STD_U16LE = H5T_STD_U16LE_g;
1221     alias H5T_STD_U32BE = H5T_STD_U32BE_g;
1222     alias H5T_STD_U32LE = H5T_STD_U32LE_g;
1223     alias H5T_STD_U64BE = H5T_STD_U64BE_g;
1224     alias H5T_STD_U64LE = H5T_STD_U64LE_g;
1225     alias H5T_STD_B8BE = H5T_STD_B8BE_g;
1226     alias H5T_STD_B8LE = H5T_STD_B8LE_g;
1227     alias H5T_STD_B16BE = H5T_STD_B16BE_g;
1228     alias H5T_STD_B16LE = H5T_STD_B16LE_g;
1229     alias H5T_STD_B32BE = H5T_STD_B32BE_g;
1230     alias H5T_STD_B32LE = H5T_STD_B32LE_g;
1231     alias H5T_STD_B64BE = H5T_STD_B64BE_g;
1232     alias H5T_STD_B64LE = H5T_STD_B64LE_g;
1233     alias H5T_STD_REF_OBJ = H5T_STD_REF_OBJ_g;
1234     alias H5T_STD_REF_DSETREG = H5T_STD_REF_DSETREG_g;
1235     extern __gshared hid_t H5T_STD_I8BE_g;
1236     extern __gshared hid_t H5T_STD_I8LE_g;
1237     extern __gshared hid_t H5T_STD_I16BE_g;
1238     extern __gshared hid_t H5T_STD_I16LE_g;
1239     extern __gshared hid_t H5T_STD_I32BE_g;
1240     extern __gshared hid_t H5T_STD_I32LE_g;
1241     extern __gshared hid_t H5T_STD_I64BE_g;
1242     extern __gshared hid_t H5T_STD_I64LE_g;
1243     extern __gshared hid_t H5T_STD_U8BE_g;
1244     extern __gshared hid_t H5T_STD_U8LE_g;
1245     extern __gshared hid_t H5T_STD_U16BE_g;
1246     extern __gshared hid_t H5T_STD_U16LE_g;
1247     extern __gshared hid_t H5T_STD_U32BE_g;
1248     extern __gshared hid_t H5T_STD_U32LE_g;
1249     extern __gshared hid_t H5T_STD_U64BE_g;
1250     extern __gshared hid_t H5T_STD_U64LE_g;
1251     extern __gshared hid_t H5T_STD_B8BE_g;
1252     extern __gshared hid_t H5T_STD_B8LE_g;
1253     extern __gshared hid_t H5T_STD_B16BE_g;
1254     extern __gshared hid_t H5T_STD_B16LE_g;
1255     extern __gshared hid_t H5T_STD_B32BE_g;
1256     extern __gshared hid_t H5T_STD_B32LE_g;
1257     extern __gshared hid_t H5T_STD_B64BE_g;
1258     extern __gshared hid_t H5T_STD_B64LE_g;
1259     extern __gshared hid_t H5T_STD_REF_OBJ_g;
1260     extern __gshared hid_t H5T_STD_REF_DSETREG_g;
1261 
1262     /*
1263      * Types which are particular to Unix.
1264      */
1265     alias H5T_UNIX_D32BE = H5T_UNIX_D32BE_g;
1266     alias H5T_UNIX_D32LE = H5T_UNIX_D32LE_g;
1267     alias H5T_UNIX_D64BE = H5T_UNIX_D64BE_g;
1268     alias H5T_UNIX_D64LE = H5T_UNIX_D64LE_g;
1269     extern __gshared hid_t H5T_UNIX_D32BE_g;
1270     extern __gshared hid_t H5T_UNIX_D32LE_g;
1271     extern __gshared hid_t H5T_UNIX_D64BE_g;
1272     extern __gshared hid_t H5T_UNIX_D64LE_g;
1273 
1274     /*
1275      * Types particular to the C language.  String types use `bytes' instead
1276      * of `bits' as their size.
1277      */
1278     alias H5T_C_S1 = H5T_C_S1_g;
1279     extern __gshared hid_t H5T_C_S1_g;
1280 
1281     /*
1282      * Types particular to Fortran.
1283      */
1284     alias H5T_FORTRAN_S1 = H5T_FORTRAN_S1_g;
1285     extern __gshared hid_t H5T_FORTRAN_S1_g;
1286 
1287 
1288     /*
1289      * These types are for Intel CPU's.  They are little endian with IEEE
1290      * floating point.
1291      */
1292     alias H5T_INTEL_I8 = H5T_STD_I8LE;
1293     alias H5T_INTEL_I16 = H5T_STD_I16LE;
1294     alias H5T_INTEL_I32 = H5T_STD_I32LE;
1295     alias H5T_INTEL_I64 = H5T_STD_I64LE;
1296     alias H5T_INTEL_U8 = H5T_STD_U8LE;
1297     alias H5T_INTEL_U16 = H5T_STD_U16LE;
1298     alias H5T_INTEL_U32 = H5T_STD_U32LE;
1299     alias H5T_INTEL_U64 = H5T_STD_U64LE;
1300     alias H5T_INTEL_B8 = H5T_STD_B8LE;
1301     alias H5T_INTEL_B16 = H5T_STD_B16LE;
1302     alias H5T_INTEL_B32 = H5T_STD_B32LE;
1303     alias H5T_INTEL_B64 = H5T_STD_B64LE;
1304     alias H5T_INTEL_F32 = H5T_IEEE_F32LE;
1305     alias H5T_INTEL_F64 = H5T_IEEE_F64LE;
1306 
1307 
1308     /*
1309      * The VAX floating point types (i.e. in VAX byte order)
1310      */
1311     alias H5T_VAX_F32 = H5T_VAX_F32_g;
1312     alias H5T_VAX_F64 = H5T_VAX_F64_g;
1313     extern __gshared hid_t H5T_VAX_F32_g;
1314     extern __gshared hid_t H5T_VAX_F64_g;
1315     alias H5T_NATIVE_SCHAR = H5T_NATIVE_SCHAR_g;
1316     alias H5T_NATIVE_UCHAR = H5T_NATIVE_UCHAR_g;
1317     alias H5T_NATIVE_SHORT = H5T_NATIVE_SHORT_g;
1318     alias H5T_NATIVE_USHORT = H5T_NATIVE_USHORT_g;
1319     alias H5T_NATIVE_INT = H5T_NATIVE_INT_g;
1320     alias H5T_NATIVE_UINT = H5T_NATIVE_UINT_g;
1321     alias H5T_NATIVE_LONG = H5T_NATIVE_LONG_g;
1322     alias H5T_NATIVE_ULONG = H5T_NATIVE_ULONG_g;
1323     alias H5T_NATIVE_LLONG = H5T_NATIVE_LLONG_g;
1324     alias H5T_NATIVE_ULLONG = H5T_NATIVE_ULLONG_g;
1325     alias H5T_NATIVE_FLOAT = H5T_NATIVE_FLOAT_g;
1326     alias H5T_NATIVE_DOUBLE = H5T_NATIVE_DOUBLE_g;
1327     alias H5T_NATIVE_B8 = H5T_NATIVE_B8_g;
1328     alias H5T_NATIVE_B16 = H5T_NATIVE_B16_g;
1329     alias H5T_NATIVE_B32 = H5T_NATIVE_B32_g;
1330     alias H5T_NATIVE_B64 = H5T_NATIVE_B64_g;
1331     alias H5T_NATIVE_OPAQUE = H5T_NATIVE_OPAQUE_g;
1332     alias H5T_NATIVE_HADDR = H5T_NATIVE_HADDR_g;
1333     alias H5T_NATIVE_HSIZE = H5T_NATIVE_HSIZE_g;
1334     alias H5T_NATIVE_HSSIZE = H5T_NATIVE_HSSIZE_g;
1335     alias H5T_NATIVE_HERR = H5T_NATIVE_HERR_g;
1336     alias H5T_NATIVE_HBOOL = H5T_NATIVE_HBOOL_g;
1337     extern __gshared hid_t H5T_NATIVE_SCHAR_g;
1338     extern __gshared hid_t H5T_NATIVE_UCHAR_g;
1339     extern __gshared hid_t H5T_NATIVE_SHORT_g;
1340     extern __gshared hid_t H5T_NATIVE_USHORT_g;
1341     extern __gshared hid_t H5T_NATIVE_INT_g;
1342     extern __gshared hid_t H5T_NATIVE_UINT_g;
1343     extern __gshared hid_t H5T_NATIVE_LONG_g;
1344     extern __gshared hid_t H5T_NATIVE_ULONG_g;
1345     extern __gshared hid_t H5T_NATIVE_LLONG_g;
1346     extern __gshared hid_t H5T_NATIVE_ULLONG_g;
1347     extern __gshared hid_t H5T_NATIVE_FLOAT_g;
1348     extern __gshared hid_t H5T_NATIVE_DOUBLE_g;
1349     static if ( H5_SIZEOF_LONG_DOUBLE !=0 ) {
1350       extern __gshared hid_t H5T_NATIVE_LDOUBLE_g;
1351     }
1352     extern __gshared hid_t H5T_NATIVE_B8_g;
1353     extern __gshared hid_t H5T_NATIVE_B16_g;
1354     extern __gshared hid_t H5T_NATIVE_B32_g;
1355     extern __gshared hid_t H5T_NATIVE_B64_g;
1356     extern __gshared hid_t H5T_NATIVE_OPAQUE_g;
1357     extern __gshared hid_t H5T_NATIVE_HADDR_g;
1358     extern __gshared hid_t H5T_NATIVE_HSIZE_g;
1359     extern __gshared hid_t H5T_NATIVE_HSSIZE_g;
1360     extern __gshared hid_t H5T_NATIVE_HERR_g;
1361     extern __gshared hid_t H5T_NATIVE_HBOOL_g;
1362 
1363     /* C9x integer types */
1364     alias H5T_NATIVE_INT8 = H5T_NATIVE_INT8_g;
1365     alias H5T_NATIVE_UINT8 = H5T_NATIVE_UINT8_g;
1366     alias H5T_NATIVE_INT_LEAST8 = H5T_NATIVE_INT_LEAST8_g;
1367     alias H5T_NATIVE_UINT_LEAST8 = H5T_NATIVE_UINT_LEAST8_g;
1368     alias H5T_NATIVE_INT_FAST8 = H5T_NATIVE_INT_FAST8_g;
1369     alias H5T_NATIVE_UINT_FAST8 = H5T_NATIVE_UINT_FAST8_g;
1370     extern __gshared hid_t H5T_NATIVE_INT8_g;
1371     extern __gshared hid_t H5T_NATIVE_UINT8_g;
1372     extern __gshared hid_t H5T_NATIVE_INT_LEAST8_g;
1373     extern __gshared hid_t H5T_NATIVE_UINT_LEAST8_g;
1374     extern __gshared hid_t H5T_NATIVE_INT_FAST8_g;
1375     extern __gshared hid_t H5T_NATIVE_UINT_FAST8_g;
1376 
1377     alias H5T_NATIVE_INT16 = H5T_NATIVE_INT16_g;
1378     alias H5T_NATIVE_UINT16 = H5T_NATIVE_UINT16_g;
1379     alias H5T_NATIVE_INT_LEAST16 = H5T_NATIVE_INT_LEAST16_g;
1380     alias H5T_NATIVE_UINT_LEAST16 = H5T_NATIVE_UINT_LEAST16_g;
1381     alias H5T_NATIVE_INT_FAST16 = H5T_NATIVE_INT_FAST16_g;
1382     alias H5T_NATIVE_UINT_FAST16 = H5T_NATIVE_UINT_FAST16_g;
1383     extern __gshared hid_t H5T_NATIVE_INT16_g;
1384     extern __gshared hid_t H5T_NATIVE_UINT16_g;
1385     extern __gshared hid_t H5T_NATIVE_INT_LEAST16_g;
1386     extern __gshared hid_t H5T_NATIVE_UINT_LEAST16_g;
1387     extern __gshared hid_t H5T_NATIVE_INT_FAST16_g;
1388     extern __gshared hid_t H5T_NATIVE_UINT_FAST16_g;
1389 
1390     alias H5T_NATIVE_INT32 = H5T_NATIVE_INT32_g;
1391     alias H5T_NATIVE_UINT32 = H5T_NATIVE_UINT32_g;
1392     alias H5T_NATIVE_INT_LEAST32 = H5T_NATIVE_INT_LEAST32_g;
1393     alias H5T_NATIVE_UINT_LEAST32 = H5T_NATIVE_UINT_LEAST32_g;
1394     alias H5T_NATIVE_INT_FAST32 = H5T_NATIVE_INT_FAST32_g;
1395     alias H5T_NATIVE_UINT_FAST32 = H5T_NATIVE_UINT_FAST32_g;
1396     extern __gshared hid_t H5T_NATIVE_INT32_g;
1397     extern __gshared hid_t H5T_NATIVE_UINT32_g;
1398     extern __gshared hid_t H5T_NATIVE_INT_LEAST32_g;
1399     extern __gshared hid_t H5T_NATIVE_UINT_LEAST32_g;
1400     extern __gshared hid_t H5T_NATIVE_INT_FAST32_g;
1401     extern __gshared hid_t H5T_NATIVE_UINT_FAST32_g;
1402 
1403     alias H5T_NATIVE_INT64 = H5T_NATIVE_INT64_g;
1404     alias H5T_NATIVE_UINT64 = H5T_NATIVE_UINT64_g;
1405     alias H5T_NATIVE_INT_LEAST64 = H5T_NATIVE_INT_LEAST64_g;
1406     alias H5T_NATIVE_UINT_LEAST64 = H5T_NATIVE_UINT_LEAST64_g;
1407     alias H5T_NATIVE_INT_FAST64 = H5T_NATIVE_INT_FAST64_g;
1408     alias H5T_NATIVE_UINT_FAST64 = H5T_NATIVE_UINT_FAST64_g;
1409     extern __gshared hid_t H5T_NATIVE_INT64_g;
1410     extern __gshared hid_t H5T_NATIVE_UINT64_g;
1411     extern __gshared hid_t H5T_NATIVE_INT_LEAST64_g;
1412     extern __gshared hid_t H5T_NATIVE_UINT_LEAST64_g;
1413     extern __gshared hid_t H5T_NATIVE_INT_FAST64_g;
1414     extern __gshared hid_t H5T_NATIVE_UINT_FAST64_g;
1415 
1416 }
1417 
1418 // alias H5ZFilter = int;
1419 
1420 /* Filter IDs */
1421 enum H5ZFilter
1422 {
1423   Error       = (-1), /*no filter         */
1424   None        = 0,    /*reserved indefinitely     */
1425   Deflate     = 1,    /*deflation like gzip           */
1426   Shuffle     = 2,       /*shuffle the data              */
1427   Fletcher32  = 3,       /*fletcher32 checksum of EDC    */
1428   SZip        = 4,       /*szip compression              */
1429   NBit        = 5,       /*nbit compression              */
1430   ScaleOffset = 6,      /*scale+offset compression      */
1431   Reserved    = 256,  /*filter ids below this value are reserved for library use */
1432   Max         = 65535,    /*maximum filter id     */
1433   All         = 0,      /* Symbol to remove all filters in H5Premove_filter */
1434 }
1435 
1436 enum H5Z_MAX_NFILTERS       = 32;      /* Maximum number of filters allowed in a pipeline */
1437                                         /* (should probably be allowed to be an
1438                                          * unlimited amount, but currently each
1439                                          * filter uses a bit in a 32-bit field,
1440                                          * so the format would have to be
1441                                          * changed to accomodate that)
1442                                          */
1443 
1444 /* Flags for filter definition (stored) */
1445 enum H5Z_FLAG_DEFMASK        = 0x00ff;  /*definition flag mask      */
1446 enum H5Z_FLAG_MANDATORY      = 0x0000;  /*filter is mandatory       */
1447 enum H5Z_FLAG_OPTIONAL       = 0x0001; /*filter is optional     */
1448 
1449 /* Additional flags for filter invocation (not stored) */
1450 enum H5Z_FLAG_INVMASK        = 0xff00; /*invocation flag mask       */
1451 enum H5Z_FLAG_REVERSE        = 0x0100; /*reverse direction; read    */
1452 enum H5Z_FLAG_SKIP_EDC       = 0x0200; /*skip EDC filters for read  */
1453 
1454 /* Special parameters for szip compression */
1455 /* [These are aliases for the similar definitions in szlib.h, which we can't
1456  * include directly due to the duplication of various symbols with the zlib.h
1457  * header file] */
1458 enum H5_SZIP_ALLOW_K13_OPTION_MASK = 1;
1459 enum H5_SZIP_CHIP_OPTION_MASK      = 2;
1460 enum H5_SZIP_EC_OPTION_MASK        = 4;
1461 enum H5_SZIP_NN_OPTION_MASK        = 32;
1462 enum H5_SZIP_MAX_PIXELS_PER_BLOCK  = 32;
1463 
1464 /* Macros for the shuffle filter */
1465 enum H5Z_SHUFFLE_USER_NPARMS  = 0;    /* Number of parameters that users can set */
1466 enum H5Z_SHUFFLE_TOTAL_NPARMS = 1;    /* Total number of parameters for filter */
1467 
1468 /* Macros for the szip filter */
1469 enum H5Z_SZIP_USER_NPARMS  = 2;       /* Number of parameters that users can set */
1470 enum H5Z_SZIP_TOTAL_NPARMS = 4;       /* Total number of parameters for filter */
1471 enum H5Z_SZIP_PARM_MASK    = 0;       /* "User" parameter for option mask */
1472 enum H5Z_SZIP_PARM_PPB     = 1;       /* "User" parameter for pixels-per-block */
1473 enum H5Z_SZIP_PARM_BPP     = 2;       /* "Local" parameter for bits-per-pixel */
1474 enum H5Z_SZIP_PARM_PPS     = 3;       /* "Local" parameter for pixels-per-scanline */
1475 
1476 /* Macros for the nbit filter */
1477 enum H5Z_NBIT_USER_NPARMS = 0;     /* Number of parameters that users can set */
1478 
1479 /* Macros for the scale offset filter */
1480 enum H5Z_SCALEOFFSET_USER_NPARMS = 2;    /* Number of parameters that users can set */
1481 
1482 /* Special parameters for ScaleOffset filter*/
1483 enum H5Z_SO_INT_MINBITS_DEFAULT = 0;
1484 enum H5Z_SO_scale_type_t {
1485     H5Z_SO_FLOAT_DSCALE = 0,
1486     H5Z_SO_FLOAT_ESCALE = 1,
1487     H5Z_SO_INT          = 2
1488 }
1489 
1490 /* Current version of the H5Z_class_t struct */
1491 enum H5Z_CLASS_T_VERS = (1);
1492 
1493 /* Values to decide if EDC is enabled for reading data */
1494 enum H5Z_EDC_t {
1495     H5Z_ERROR_EDC       = -1,   /* error value */
1496     H5Z_DISABLE_EDC     = 0,
1497     H5Z_ENABLE_EDC      = 1,
1498     H5Z_NO_EDC          = 2     /* must be the last */
1499 }
1500 
1501 /* Bit flags for H5Zget_filter_info */
1502 enum H5Z_FILTER_CONFIG_ENCODE_ENABLED = (0x0001);
1503 enum H5Z_FILTER_CONFIG_DECODE_ENABLED = (0x0002);
1504 
1505 /* Return values for filter callback function */
1506 enum H5Z_cb_return_t {
1507     H5Z_CB_ERROR  = -1,
1508     H5Z_CB_FAIL   = 0,    /* I/O should fail if filter fails. */
1509     H5Z_CB_CONT   = 1,    /* I/O continues if filter fails.   */
1510     H5Z_CB_NO     = 2
1511 }
1512 
1513 extern(C)
1514 {
1515     /* Filter callback function definition */
1516     alias H5Z_filter_func_t = H5Z_cb_return_t function(H5ZFilter filter, void* buf,
1517                                     size_t buf_size, void* op_data);
1518 
1519     /* Structure for filter callback property */
1520         struct H5Z_cb_t {
1521           H5Z_filter_func_t func;
1522           void*              op_data;
1523        }
1524     alias H5Z_can_apply_func_t = htri_t function(hid_t dcpl_id, hid_t type_id, hid_t space_id);
1525     alias H5Z_set_local_func_t = herr_t function(hid_t dcpl_id, hid_t type_id, hid_t space_id);
1526     alias H5Z_func_t = size_t function(uint flags, size_t cd_nelmts, const uint* cd_values, size_t nbytes, size_t *buf_size, void **buf);
1527 
1528       struct H5Z_class2_t {
1529         int _version;                /* Version number of the H5Z_class_t struct */
1530         H5ZFilter id;        /* Filter ID number              */
1531         int encoder_present;   /* Does this filter have an encoder? */
1532         int decoder_present;   /* Does this filter have a decoder? */
1533         const char  *name;      /* Comment for debugging             */
1534         H5Z_can_apply_func_t can_apply; /* The "can apply" callback for a filter */
1535         H5Z_set_local_func_t set_local; /* The "set local" callback for a filter */
1536         H5Z_func_t filter;      /* The actual filter function            */
1537       }
1538 
1539 }
1540 
1541 
1542 alias MPI_Datatype = int;
1543 alias MPI_Comm = int;
1544 alias MPI_Info = int;
1545 enum MPI_LONG_LONG_INT = cast(MPI_Datatype) 0x4c000809;
1546 enum H5_CLEAR_MEMORY = 1;
1547 enum H5_CONVERT_DENORMAL_FLOAT = 1;
1548 enum H5_DEFAULT_PLUGINDIR = "/usr/local/hdf5/lib/plugin";
1549 enum H5_DEV_T_IS_SCALAR = 1;
1550 enum H5_FP_TO_INTEGER_OVERFLOW_WORKS = 1;
1551 enum H5_FP_TO_ULLONG_ACCURATE = 1;
1552 enum H5_FP_TO_ULLONG_RIGHT_MAXIMUM = 1;
1553 enum H5_GETTIMEOFDAY_GIVES_TZ = 1;
1554 enum H5_HAVE_ALARM = 1;
1555 enum H5_HAVE_ATTRIBUTE = 1;
1556 enum H5_HAVE_C99_DESIGNATED_INITIALIZER = 1;
1557 enum H5_HAVE_C99_FUNC = 1;
1558 enum H5_HAVE_CLOCK_GETTIME = 1;
1559 enum H5_HAVE_DIFFTIME = 1;
1560 enum H5_HAVE_DIRENT_H = 1;
1561 enum H5_HAVE_DLFCN_H = 1;
1562 enum H5_HAVE_EMBEDDED_LIBINFO = 1;
1563 enum H5_HAVE_FEATURES_H = 1;
1564 enum H5_HAVE_FILTER_DEFLATE = 1;
1565 enum H5_HAVE_FILTER_FLETCHER32 = 1;
1566 enum H5_HAVE_FILTER_NBIT = 1;
1567 enum H5_HAVE_FILTER_SCALEOFFSET = 1;
1568 enum H5_HAVE_FILTER_SHUFFLE = 1;
1569 enum H5_HAVE_FORK = 1;
1570 enum H5_HAVE_FREXPF = 1;
1571 enum H5_HAVE_FREXPL = 1;
1572 enum H5_HAVE_FSEEKO = 1;
1573 enum H5_HAVE_FSEEKO64 = 1;
1574 enum H5_HAVE_FSTAT64 = 1;
1575 enum H5_HAVE_FTELLO = 1;
1576 enum H5_HAVE_FTELLO64 = 1;
1577 enum H5_HAVE_FTRUNCATE64 = 1;
1578 enum H5_HAVE_FUNCTION = 1;
1579 enum H5_HAVE_GETHOSTNAME = 1;
1580 enum H5_HAVE_GETPWUID = 1;
1581 enum H5_HAVE_GETRUSAGE = 1;
1582 enum H5_HAVE_GETTIMEOFDAY = 1;
1583 enum H5_HAVE_INTTYPES_H = 1;
1584 enum H5_HAVE_IOCTL = 1;
1585 enum H5_HAVE_LIBDL = 1;
1586 enum H5_HAVE_LIBM = 1;
1587 enum H5_HAVE_LIBZ = 1;
1588 enum H5_HAVE_LONGJMP = 1;
1589 enum H5_HAVE_LSEEK64 = 1;
1590 enum H5_HAVE_LSTAT = 1;
1591 enum H5_HAVE_MEMORY_H = 1;
1592 enum H5_HAVE_MPI_GET_SIZE = 1;
1593 enum H5_HAVE_MPI_MULTI_LANG_Comm = 1;
1594 enum H5_HAVE_MPI_MULTI_LANG_Info = 1;
1595 enum H5_HAVE_PARALLEL = 1;
1596 enum H5_HAVE_RANDOM = 1;
1597 enum H5_HAVE_RAND_R = 1;
1598 enum H5_HAVE_SETJMP = 1;
1599 enum H5_HAVE_SETJMP_H = 1;
1600 enum H5_HAVE_SIGLONGJMP = 1;
1601 enum H5_HAVE_SIGNAL = 1;
1602 enum H5_HAVE_SIGPROCMASK = 1;
1603 enum H5_HAVE_SNPRINTF = 1;
1604 enum H5_HAVE_SRANDOM = 1;
1605 enum H5_HAVE_STAT64 = 1;
1606 enum H5_HAVE_STAT_ST_BLOCKS = 1;
1607 enum H5_HAVE_STDDEF_H = 1;
1608 enum H5_HAVE_STDINT_H = 1;
1609 enum H5_HAVE_STDLIB_H = 1;
1610 enum H5_HAVE_STRDUP = 1;
1611 enum H5_HAVE_STRINGS_H = 1;
1612 enum H5_HAVE_STRING_H = 1;
1613 enum H5_HAVE_STRUCT_TIMEZONE = 1;
1614 enum H5_HAVE_STRUCT_TM_TM_ZONE = 1;
1615 enum H5_HAVE_SYMLINK = 1;
1616 enum H5_HAVE_SYSTEM = 1;
1617 enum H5_HAVE_SYS_IOCTL_H = 1;
1618 enum H5_HAVE_SYS_RESOURCE_H = 1;
1619 enum H5_HAVE_SYS_SOCKET_H = 1;
1620 enum H5_HAVE_SYS_STAT_H = 1;
1621 enum H5_HAVE_SYS_TIMEB_H = 1;
1622 enum H5_HAVE_SYS_TIME_H = 1;
1623 enum H5_HAVE_SYS_TYPES_H = 1;
1624 enum H5_HAVE_TIOCGETD = 1;
1625 enum H5_HAVE_TIOCGWINSZ = 1;
1626 enum H5_HAVE_TMPFILE = 1;
1627 enum H5_HAVE_TM_GMTOFF = 1;
1628 enum H5_HAVE_TM_ZONE = 1;
1629 enum H5_HAVE_UNISTD_H = 1;
1630 enum H5_HAVE_VASPRINTF = 1;
1631 enum H5_HAVE_VSNPRINTF = 1;
1632 enum H5_HAVE_WAITPID = 1;
1633 enum H5_HAVE_ZLIB_H = 1;
1634 enum H5_INCLUDE_HL = 1;
1635 enum H5_INTEGER_TO_LDOUBLE_ACCURATE = 1;
1636 enum H5_LDOUBLE_TO_INTEGER_ACCURATE = 1;
1637 enum H5_LDOUBLE_TO_INTEGER_WORKS = 1;
1638 enum H5_LDOUBLE_TO_LLONG_ACCURATE = 1;
1639 enum H5_LDOUBLE_TO_UINT_ACCURATE = 1;
1640 enum H5_LLONG_TO_FP_CAST_WORKS = 1;
1641 enum H5_LLONG_TO_LDOUBLE_CORRECT = 1;
1642 enum H5_LT_OBJDIR = ".libs/";
1643 enum H5_MPI_FILE_SET_SIZE_BIG = 1;
1644 enum H5_NO_ALIGNMENT_RESTRICTIONS = 1;
1645 enum H5_PACKAGE = "hdf5";
1646 enum H5_PACKAGE_BUGREPORT = "help@hdfgroup.org";
1647 enum H5_PACKAGE_NAME = "HDF5";
1648 enum H5_PACKAGE_STRING = "HDF5 1.8.13";
1649 enum H5_PACKAGE_TARNAME = "hdf5";
1650 enum H5_PACKAGE_URL = "";
1651 enum H5_PACKAGE_VERSION = "1.8.13";
1652 enum H5_PRINTF_LL_WIDTH = "l";
1653 enum H5_SIZEOF_CHAR = 1;
1654 enum H5_SIZEOF_DOUBLE = 8;
1655 enum H5_SIZEOF_FLOAT = 4;
1656 enum H5_SIZEOF_INT = 4;
1657 enum H5_SIZEOF_INT16_T = 2;
1658 enum H5_SIZEOF_INT32_T = 4;
1659 enum H5_SIZEOF_INT64_T = 8;
1660 enum H5_SIZEOF_INT8_T = 1;
1661 enum H5_SIZEOF_INT_FAST16_T = 8;
1662 enum H5_SIZEOF_INT_FAST32_T = 8;
1663 enum H5_SIZEOF_INT_FAST64_T = 8;
1664 enum H5_SIZEOF_INT_FAST8_T = 1;
1665 enum H5_SIZEOF_INT_LEAST16_T = 2;
1666 enum H5_SIZEOF_INT_LEAST32_T = 4;
1667 enum H5_SIZEOF_INT_LEAST64_T = 8;
1668 enum H5_SIZEOF_INT_LEAST8_T = 1;
1669 enum H5_SIZEOF_LONG = 8;
1670 enum H5_SIZEOF_LONG_DOUBLE = 16;
1671 enum H5_SIZEOF_LONG_LONG = 8;
1672 enum H5_SIZEOF_OFF64_T = 8;
1673 enum H5_SIZEOF_OFF_T = 8;
1674 enum H5_SIZEOF_PTRDIFF_T = 8;
1675 enum H5_SIZEOF_SHORT = 2;
1676 enum H5_SIZEOF_SIZE_T = 8;
1677 enum H5_SIZEOF_SSIZE_T = 8;
1678 enum H5_SIZEOF_UINT16_T = 2;
1679 enum H5_SIZEOF_UINT32_T = 4;
1680 enum H5_SIZEOF_UINT64_T = 8;
1681 enum H5_SIZEOF_UINT8_T = 1;
1682 enum H5_SIZEOF_UINT_FAST16_T = 8;
1683 enum H5_SIZEOF_UINT_FAST32_T = 8;
1684 enum H5_SIZEOF_UINT_FAST64_T = 8;
1685 enum H5_SIZEOF_UINT_FAST8_T = 1;
1686 enum H5_SIZEOF_UINT_LEAST16_T = 2;
1687 enum H5_SIZEOF_UINT_LEAST32_T = 4;
1688 enum H5_SIZEOF_UINT_LEAST64_T = 8;
1689 enum H5_SIZEOF_UINT_LEAST8_T = 1;
1690 enum H5_SIZEOF_UNSIGNED = 4;
1691 enum H5_SIZEOF___INT64 = 0;
1692 enum H5_STDC_HEADERS = 1;
1693 enum H5_SYSTEM_SCOPE_THREADS = 1;
1694 enum H5_TIME_WITH_SYS_TIME = 1;
1695 enum H5_ULLONG_TO_FP_CAST_WORKS = 1;
1696 enum H5_ULLONG_TO_LDOUBLE_PRECISION = 1;
1697 enum H5_ULONG_TO_FLOAT_ACCURATE = 1;
1698 enum H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE = 1;
1699 enum H5_VERSION = "1.8.13";
1700 enum H5_VSNPRINTF_WORKS = 1;
1701 enum H5_WANT_DATA_ACCURACY = 1;
1702 enum H5_WANT_DCONV_EXCEPTION = 1;
1703 enum WORDS_BIGENDIAN = 0;
1704